<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>${app.appName}</title>
    <link href="/css/layui.css" rel="stylesheet"/>
</head>
<body>
<ul class="layui-nav">
    <li class="layui-nav-item"><a href="/app/list">产品</a></li>
    <li class="layui-nav-item"><a href="#">控制</a></li>
</ul>
<div class="layui-container">

    <div style="display:flex;justify-content: center;margin:20px;">
        <div style="text-align:center;">
            <h3 th:text="${app.appName}"/>
            <img th:src="${app.icon}" style="width:80px;height:80px;margin-top:10px;border-radius:5%;"/>
        </div>
    </div>

    <table class="layui-table">
        <colgroup>
            <col width="200">
            <col width="200">
            <col width="50">
        </colgroup>
        <thead>
        <tr>
            <th>发布日期</th>
            <th>版本信息</th>
            <th>下载状态</th>
        </tr>
        </thead>
        <tbody>

        <tr th:each="info:${list}">
            <td th:text="${#dates.format(info.createDate,'yyyy-MM-dd HH:mm:ss')}"></td>
            <td th:text="${info.versionName}"></td>
            <td th:if="${info.status}==1">
                <button type="button" class="layui-btn">发布中</button>
            </td>
            <td th:if="${info.status}!=1">
                <button type="button" class="layui-btn layui-btn-primary">已归档</button>
            </td>
        </tr>
        </tbody>
    </table>

</div>
<script src="/js/layui.js"></script>
</body>
</html>